/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.openbravo.data.loader;

import cn.ekuma.data.dao.bean.IKeyed;
import cn.ekuma.data.dao.bean.I_BaseBean;

/**
 *
 * @author Administrator
 */
public class KeyBuilder {

    public static IKeyed<String> getKey(final String s){
        return new IKeyed<String>(){
            public String getKey() {
                return s;
            }
        };
    }
    
    public static IKeyed<Integer> getKey(final int i){
        return new IKeyed<Integer>(){
            public Integer getKey() {
               return i;
            }
        };
    }
    
    public static IKeyed getBeanKey(I_BaseBean b){
    	final Object key=b.getKey();
    	return new IKeyed(){
			@Override
			public Object getKey() {
				return key;
			}
    		
    	};
    }
}
